/** 
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2022 © Smartdot Technologies Co., Ltd.
 */
package com.hd.rcugrc.project.leaveapplication.annualleave.mvc;

import com.hd.rcugrc.bpm.facade.mobile.mvc.query.ListInfoQuery;
import com.hd.rcugrc.bpm.facade.mobile.mvc.query.ListQueryResult;
import com.hd.rcugrc.security.context.AuthenticationHelper;
import com.hd.rcugrc.web.ws.Expression;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hd.rcugrc.project.leaveapplication.annualleave.service.OaOfficeAnnualLeaveService;



/**
 * 年假维护-控制器 - 由代码生成器生成
 * 
 * @class: OaOfficeAnnualLeaveController
 * @date 2024-07-26 16:12:53
 * @author smartdot
 * @version 1.0 - 2024-07-26 16:12:53
 * @see
 */

@RestController("OaOfficeAnnualLeaveController")
@RequestMapping("${url.rest.prefix.framework.v1}/oaofficeannualleave")
public class OaOfficeAnnualLeaveController implements InitializingBean {
    
    Logger logger = LoggerFactory.getLogger(getClass());
    
    @Autowired
    @Qualifier("oaOfficeAnnualLeaveService")
    private OaOfficeAnnualLeaveService oaOfficeAnnualLeaveService;
    
    @Override
    public void afterPropertiesSet() throws Exception {
        Assert.notNull(oaOfficeAnnualLeaveService, "oaOfficeAnnualLeaveService is required!");
    }

    public ListQueryResult myList(@RequestBody ListInfoQuery listInfoQuery) {
        String account = AuthenticationHelper.getCurrentUser();
        ListQueryResult result = this.oaOfficeAnnualLeaveService.findListByUser(account);
        return result;
    }
}
